<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" lang="en-US">
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html lang="en-US">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Mtons.com</title>

<link rel="stylesheet" href="./dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./dist/css/style.css">
<link rel="stylesheet" href="./dist/css/layout.css">

<!-- JavaScript -->
<script type="text/javascript" src="./dist/js/jquery.min.js"></script>
<script type="text/javascript" src="./dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="./dist/js/plugins.js"></script>

<link rel='stylesheet' media='all' href='./dist/css/tagit.css' />
<link href="./dist/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">

<script type="text/javascript" charset="utf-8" src="./dist/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="./dist/umeditor/umeditor.min.js"></script>
<script type="text/javascript" charset="utf-8" src="./dist/js/tag-it.js"></script>
			
</head>
<body>
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand logo" href="#"><img
					src="http://mtons.com/dist/images/logo/m.png"></a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-right">
					<li><a href="/home">我的首页</a></li>
					<li><a href="/browse/explore">发现</a></li>
					<li><a href="/browse/gallery">走廊</a></li>

					<li><a href="/account/profile" class="ava" title="settings">
							<img class="img-circle"
							src="http://mtons.com/store/ava/1/0/0/100.jpg">
					</a></li>
					<li><a href="/logout" class="btn btn-link logout"
						title="Sign out"> <span class="fa fa-power-off"></span>
					</a></li>
				</ul>
				<form class="navbar-form navbar-right" method="get"
					action="/browse/search">
					<input type="text" class="form-control" name="q"
						placeholder="搜索...">
				</form>
			</div>
		</div>
	</nav>

	<section class="site-main container">
		<div class="site-content">
			<div class="panel panel-default">
				<div class="panel-heading">
					<span class="glyphicon glyphicon-edit"></span> 发布文字
				</div>
				<div class="panel-body">
					<div id="message"></div>
					<form class="form-horizontal" action="/blog/post" method="post"
						enctype="multipart/form-data">
						<input type="hidden" name="type" value="text" />
						<div class="form-group">
							<label class="col-sm-2 control-label no-padding-right">标题</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" name="title"
									data-required>
							</div>
						</div>
						<div class="form-group">
							<label for="desc" class="col-sm-2 control-label no-padding-right">内容:</label>
							<div class="col-sm-8">
								<textarea id="content" name="content" rows="5" data-required
									data-describedby="message" data-description="content"></textarea>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label no-padding-right">标签</label>
							<div class="col-sm-8">
								<input type="hidden" name="tags" id="fieldTags">
								<ul id="tags"></ul>
								<p class="help-block" style="font-size: 12px;">添加相关标签，用逗号或空格分隔.</p>
							</div>
						</div>
						<div class="row">
							<div class="form-group">
								<div class="text-center">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</div>
					</form>
					<!-- /form-actions -->
				</div>
			</div>
		</div>
	</section>
</body>
<script type="text/javascript">
$(function () {
	UM.getEditor('content',{
		toolbar: ["bold","italic","underline","justifyleft","justifycenter",
			"justifyright","blockquote","link","unlink","inserttable","removeformat","fullscreen"],
		autoClearinitialContent: true,
		wordCount:true,
		maximumWords:2000,
		initialFrameWidth:'100%',
		initialFrameHeight:300
	});

	$('#tags').tagit({
		singleField: true,
		singleFieldNode: $('#fieldTags')
	});

})

</script>
</html>